<%
    HttpSession ssesionOk = request.getSession();
    if (ssesionOk.getAttribute("cedula") == null || (Integer)ssesionOk.getAttribute("rol")!=4) {
        ssesionOk.setAttribute("error","Primero tienes que loguearte");
%>
<jsp:forward page="index.jsp"/>
<%
    }
%>